package com.danco.training.view;

import java.io.BufferedReader;
import java.io.Console;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

import javafx.util.converter.IntegerStringConverter;


public class IOUtil {

	public static String read()  {
	
		
		
		     BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
		     try{
		     String inputString = bufferRead.readLine().toString();
		     return inputString;
			
			} catch (IOException e) {
				e.printStackTrace();
				return null;
			}
		     
		
		  
	}

	
	
	public static double readDouble(){
		double d = Double.parseDouble(read());
		return d;
		
	}
	
	public static int readInt(){
		
		int i = Integer.parseInt(read());
		
		return i;
		
	}
	
	

	public static void write(Object... args) {
		StringBuffer str = new StringBuffer();
		for(int i = 0; i < args.length; i++){
			str.append(args[i]);
		}
		System.out.println(str);
		

	}



	public static Date readDate() {
		Date date = null;
		try {
			date = (Date) new SimpleDateFormat("yyyy:MM:dd").parse(read());
		} catch (ParseException e) {
		
			e.printStackTrace();
		}
		return date;
	}
	
	


	



}
